<!DOCTYPE html>
<html lang="zh-CN">
<!--
 * Xiaohong XeLa formatting document
 * Xiaohong XeLa Chinese document
 * Xiaohong XeLa modify many places
-->
<head>
    <meta charset="utf-8">
    <meta name="viewport"
        content="target-densitydpi=device-dpi, height=660, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <script src="../../blockly_compressed.js"></script>
    <script src="../../javascript_compressed.js"></script>
    <script src="../../msg/js/zh-hans.js"></script>
    <script src="../../blocks_compressed.js"></script>
    <script src="./analytics.js"></script>
    <script src="./block_definition_extractor.js"></script>
    <script src="./factory_utils.js"></script>
    <script src="./workspacefactory/wfactory_model.js"></script>
    <script src="./standard_categories.js"></script>
    <script src="./cp.js"></script>
    <script src="./workspacefactory/wfactory_controller.js"></script>
    <script src="./workspacefactory/wfactory_view.js"></script>
    <script src="./workspacefactory/wfactory_generator.js"></script>
    <script src="./workspacefactory/wfactory_init.js"></script>
    <script src="./block_option.js"></script>
    <script src="./factory.js"></script>
    <script src="./block_library_view.js"></script>
    <script src="./block_library_storage.js"></script>
    <script src="./block_library_controller.js"></script>
    <script src="./block_exporter_tools.js"></script>
    <script src="./block_exporter_view.js"></script>
    <script src="./block_exporter_controller.js"></script>
    <script src="./blocks.js"></script>
    <script src="./app_controller.js"></script>
    <script src="../../../storage.js"></script>
    <script src="../../../jqurey.js"></script>
    <link rel="stylesheet" href="./factory.css">
    <link rel="stylesheet" href="./cp.css">
    <script src="../../../../google/code-prettify/master/loader/run_prettify.js"></script>
    <script>
        var blocklyFactory;
        var init = function () {
            BlocklyDevTools.Analytics.init();

            blocklyFactory = new AppController();
            blocklyFactory.init();
            window.addEventListener('beforeunload', blocklyFactory.confirmLeavePage);
        };
        window.addEventListener('load', init);
    </script>
</head>

<body>
    <h1>Blockly Developer Tools</h1>
    <div id="tabContainer">
        <div id="blockFactory_tab" class="tab tabon">积木工厂</div>
        <div id="blocklibraryExporter_tab" class="tab taboff">积木导出</div>
        <div id="workspaceFactory_tab" class="tab taboff">工作区工厂</div>
    </div>
    <div id="blockLibraryExporter">
        <br>
        <p>首先，通过单击从“我的积木”库中选择积木。然后，使用“导出设置”表单下载选定积木的入门代码。</p>
        <div id="exportSelector">
            <br>
            <h3>积木选择器</h3>
            <div class="dropdown">
                <button id="button_setBlocks">选择</button>
                <div id="dropdownDiv_setBlocks" class="dropdown-content">
                    <a id="dropdown_addAllFromLib" title="选择所有“我的积木”库的积木。">全部存储在“我的积木”库中</a>
                    <a id="dropdown_addAllUsed"
                        title="选择工作空间工厂中使用的所有“我的积木”库的积木。">全部用于工作区工厂</a>
                </div>
                <button id="clearSelectedButton" title="清除选定的积木。">清除所选</button>
            </div>
            <div id="blockSelector"></div>
        </div>
        <div id="exportSettings">
            <br>
            <h3> 导出设置 </h3>
            <form id="exportSettingsForm">
                <div id="selectedBlocksTextContainer">
                    <p>当前选择：</p>
                    <p id="selectedBlocksText"></p>
                </div>
                <label><input type="checkbox" id="blockDefCheck">积木定义</label><br>
                <div id="blockDefSettings" class="subsettings">
                    <label>格式：
                        <select id="exportFormat">
                            <option value="JSON">JSON</option>
                            <option value="JavaScript">JavaScript</option>
                        </select></label>
                    <br>
                    <label>文件名：<br>
                        <input type="text" id="blockDef_filename" value="xxx_block"></label>
                </div>
                <br>
                <label><input type="checkbox" id="genStubCheck">代码生成器</label><br>
                <div id="genStubSettings" class="subsettings">
                    <label>代码语言：
                        <select id="exportLanguage">
                            <option value="JavaScript">JavaScript</option>
                            <option value="Python">Python</option>
                            <option value="PHP">PHP</option>
                            <option value="Lua">Lua</option>
                            <option value="Dart">Dart</option>
                        </select></label>
                    <br>
                    <label>文件名：<br>
                        <input type="text" id="generatorStub_filename" value="xxx_code"></label><br>
                </div>
                <br>
            </form>
            <button id="exporterSubmitButton"
                title="按照导出设置中的指定下载积木启动代码。">导出（2个文件）</button>
        </div>
        <div id="exportPreview">
            <br>
            <h3>生成预览</h3>
            <div id="blockDefs" class="exportPreviewTextArea">
                <p id="blockDefs_label">积木定义：</p>
                <pre id="blockDefs_textArea" class="prettyprint lang-js"></pre>
            </div>
            <div id="genStubs" class="exportPreviewTextArea">
                <p id="genStubs_label">代码生成器：</p>
                <pre id="genStubs_textArea" class="prettyprint lang-js"></pre>
            </div>
        </div>
    </div>
    <div id="workspaceFactoryContent">
        <div id="factoryHeader">
            <p>
            <div class="dropdown">
                <button id="button_importBlocks">导入自定义积木</button>
                <div id="dropdownDiv_importBlocks" class="dropdown-content">
                    <input type="file" id="input_importBlocksJson" accept=".js, .json, .txt" class="inputfile"> </input>
                    <label for="input_importBlocksJson">来自 JSON</label>
                    <input type="file" id="input_importBlocksJs" accept=".js, .txt" class="inputfile"> </input>
                    <label for="input_importBlocksJs">来自 Javascript</label>
                </div>
            </div>
            <div class="dropdown">
                <button id="button_load">载入编辑</button>
                <div id="dropdownDiv_load" class="dropdown-content">
                    <input type="file" id="input_loadToolbox" accept=".xml" class="inputfile"></input>
                    <label for="input_loadToolbox">工具箱</label>
                    <input type="file" id="input_loadPreload" accept=".xml" class="inputfile"></input>
                    <label for="input_loadPreload">工作区积木</label>
                </div>
            </div>
            <div class="dropdown">
                <button id="button_export">输出</button>
                <div id="dropdownDiv_export" class="dropdown-content">
                    <a id="dropdown_exportOptions">入门代码</a>
                    <a id="dropdown_exportToolbox">工具箱</a>
                    <a id="dropdown_exportPreload">工作区积木</a>
                    <a id="dropdown_exportAll">全部</a>
                </div>
            </div>
            <button id="button_clear">清除</button>
            </p>
        </div>
        <section id="createDiv">
            <div id="createHeader">
                <h3>编辑</h3>
                <p id="editHelpText">将积木拖动到工作空间中，以在自定义工作空间中配置工具箱。</p>
            </div>
            <table id="workspaceTabs" style="width:auto; height:auto">
                <tr>
                    <td id="tab_toolbox" class="tabon">工具箱</td>
                    <td id="tab_preload" class="taboff">工作区</td>
                </tr>
            </table>
            <section id="toolbox_section">
                <div id="toolbox_blocks"></div>
            </section>
            <aside id="toolbox_div">
                <p id="categoryHeader">您目前没有任何类别。</p>
                <table id="categoryTable" style="width:auto; height:auto">
                </table>
                <p>&nbsp;</p>
                <div class="dropdown">
                    <button id="button_add" class="large">+</button>
                    <div id="dropdownDiv_add" class="dropdown-content">
                        <a id="dropdown_newCategory">新类别</a>
                        <a id="dropdown_loadCategory">标准 类别</a>
                        <a id="dropdown_separator">分隔线</a>
                        <a id="dropdown_loadStandardToolbox">标准 工具箱</a>
                    </div>
                </div>
                <button id="button_remove" class="large">-</button>
                <button id="button_up" class="large">&#8593;</button>
                <button id="button_down" class="large">&#8595;</button>
                <br>
                <div class="dropdown">
                    <button id="button_editCategory">编辑类别……</button>
                    <div id="dropdownDiv_editCategory" class="dropdown-content">
                        <input id="categoryName">
                        <input id="categoryColour" value="000000">
                        <button id="categorySave">保存</button>
                    </div>
                </div>
            </aside>
            <button id="button_addShadow" style="display: none">创建阴影</button>
            <button id="button_removeShadow" style="display: none">移除阴影</button>
            <aside id="preload_div" style="display:none">
                <div id="preloadHelp">
                    <p>为 Blockly 注入调用配置选项。</p>
                    <button id="button_optionsHelp">帮助</button>
                    <button class="small" id="button_standardOptions">重置为默认</button>
                </div>
                <div id="workspace_options">
                    <label><input type="checkbox" id="option_readOnly_checkbox">只读</label><br>
                    <label><input type="checkbox" id="option_grid_checkbox">使用网格</label><br>
                    <div id="grid_options" style="display: none">
                        <label>间距 <input type="number" id="gridOption_spacing_number" style="width: 3em"></label><br>
                        <label>长度 <input type="number" id="gridOption_length_number" style="width: 3em"></label><br>
                        <label>颜色 <input type="text" id="gridOption_colour_text" style="width: 8em"></label><br>
                        <div id="readonly1">
                            <label><input type="checkbox" id="gridOption_snap_checkbox">Snap</label><br>
                        </div>
                    </div>
                    <label>媒体路径<input type="text" id="option_media_text" style="width: 90%"></label><br>
                    <label><input type="checkbox" id="option_rtl_checkbox">使用 RTL 布局</label><br>
                    <label><input type="checkbox" id="option_scrollbars_checkbox">显示滚动条</label><br>
                    <label><input type="checkbox" id="option_zoom_checkbox">启用缩放</label><br>
                    <div id="zoom_options" style="display: none">
                        <label><input type="checkbox" id="zoomOption_controls_checkbox">显示缩放控制器</label><br>
                        <label><input type="checkbox" id="zoomOption_wheel_checkbox">鼠标滚轮缩放</label><br>
                        <label>初始大小 <input type="number" id="zoomOption_startScale_number"
                                style="width: 4em"></label><br>
                        <label>最大大小 <input type="number" id="zoomOption_maxScale_number" style="width: 4em"></label><br>
                        <label>最小大小 <input type="number" id="zoomOption_minScale_number" style="width: 4em"></label><br>
                        <label>缩放速度 <input type="number" id="zoomOption_scaleSpeed_number"
                                style="width: 4em"></label><br>
                    </div>
                    <label><input type="checkbox" id="option_css_checkbox">使用 Blockly CSS</label><br>
                    <div id="readonly2">
                        <label><input type="checkbox" id="option_collapse_checkbox">可折叠积木</label><br>
                        <label><input type="checkbox" id="option_comments_checkbox">可注释积木</label><br>
                        <label><input type="checkbox" id="option_disable_checkbox">可禁用积木</label><br>
                        <label><input type="checkbox" id="option_infiniteBlocks_checkbox">无限积木</label><br>
                        <div id="maxBlockNumber_option" style="display: none">
                            <label>最大积木数量 <input type="number" id="option_maxBlocks_number"
                                    style="width: 5em"></label><br>
                        </div>
                        <label><input type="checkbox" id="option_horizontalLayout_checkbox">水平工具箱</label><br>
                        <label><input type="checkbox" id="option_toolboxPosition_checkbox">将工具箱放到右侧</label><br>
                        <label><input type="checkbox" id="option_oneBasedIndex_checkbox">以一为基的指数</label><br>
                        <label><input type="checkbox" id="option_sounds_checkbox">启用声音<br>
                            <label><input type="checkbox" id="option_trashcan_checkbox">显示垃圾箱</label><br>
                    </div>
                </div>
            </aside>
        </section>
        <aside id="previewDiv">
            <div id="previewBorder">
                <div id="previewHelp">
                    <h3>预览</h3>
                    <p>这就是您的自定义工作区的样子。</p>
                </div>
                <div id="preview_blocks" class="content"></div>
            </div>
        </aside>
    </div>
    <table id="blockFactoryContent">
        <tr width="100%" height="10%">
            <td width="50%" height="5%">
                <table>
                    <tr id="blockLibrary">
                        <td id="blockLibraryContainer">
                            <span>
                                <div class="dropdown">
                                    <button id="button_blockLib">我的积木</button>
                                    <div id="dropdownDiv_blockLib" class="dropdown-content">
                                        <a id="createNewBlockButton">创建新积木</a>
                                    </div>
                                </div>
                                <select id="blockLibraryDropdown" style="display:none">
                                </select>
                            </span>
                        </td>
                        <td id="blockLibraryControls">
                            <button id="saveToBlockLibraryButton" title="将积木保存到“我的积木”中">
                                保存"block_type"
                            </button>
                            <button id="removeBlockFromLibraryButton" title="从“我的积木”中删除积木">
                                删除"block_type"
                            </button>
                        </td>
                    </tr>
                </table>
            </td>
            <td height="5%">
                <table id="blockFactoryPreview">
                    <tr>
                        <td id="previewContainer">
                            <h3>积木样式预览：
                                <select id="direction">
                                    <option value="ltr">LTR</option>
                                    <option value="rtl">RTL</option>
                                </select>
                            </h3>
                        </td>
                        <td id="buttonContainer">
                            <span>“我的积木”选项：</span>
                            <button id="clearBlockLibraryButton" title="清除“我的积木”库。">
                                <span>清空</span>
                            </button>
                            <label for="files" class="buttonStyle">
                                <span>导入</span>
                            </label>
                            <input id="files" type="file" name="files" accept="application/xml">
                            <button id="localSaveButton" title="将“我的积木”库转换为XML文件并保存到本地">
                                <span>下载</span>
                            </button>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr height="80%">
            <td id="blocklyWorkspaceContainer">
                <div class="blocklyToolboxDelete delect-block-zone"><svg
                        xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none"
                        version="1.1" width="64" id="delete-svg-up" class="delete-svg" height="16" viewBox="0 0 64 16">
                        <g style="mix-blend-mode:passthrough">
                            <path
                                d="M17,0C13.6863,0,11,2.68629,11,6L11,8L4,8C1.79086,8,0,9.79086,0,12C0,14.2091,1.79086,16,4,16L60,16C62.2091,16,64,14.2091,64,12C64,9.79086,62.2091,8,60,8L53,8L53,6C53,2.68629,50.3137,0,47,0L17,0Z"
                                fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"></path>
                        </g>
                    </svg><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none"
                        version="1.1" width="52" id="delete-svg-down" class="delete-svg" height="45"
                        viewBox="0 0 52 45">
                        <g style="mix-blend-mode:passthrough">
                            <path
                                d="M0,3C0,1.34315,1.34315,0,3,0L49,0C50.6569,0,52,1.34315,52,3L52,36C52,40.9706,47.9706,45,43,45L9,45C4.02944,45,0,40.9706,0,36L0,3ZM11,12.5C11,10.0147,13.0147,8,15.5,8C17.9853,8,20,10.0147,20,12.5L20,32.5C20,34.9853,17.9853,37,15.5,37C13.0147,37,11,34.9853,11,32.5L11,12.5ZM35.5,8C33.0147,8,31,10.0147,31,12.5L31,32.5C31,34.9853,33.0147,37,35.5,37C37.9853,37,40,34.9853,40,32.5L40,12.5C40,10.0147,37.9853,8,35.5,8Z"
                                fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"></path>
                        </g>
                    </svg></div>
                <div id="blockly"></div>
                <div id="blocklyMask"></div>
            </td>
            <td width="50%">
                <table id="blocklyPreviewContainer">
                    <tr>
                        <td height="30%">
                            <div id="preview"></div>
                        </td>
                    </tr>
                    <tr>
                        <td height="5%">
                            <h3>积木定义：
                                <select id="format">
                                    <option value="JSON">JSON</option>
                                    <option value="JavaScript">JavaScript</option>
                                    <option value="Manual-JSON">自定义 JSON&hellip;</option>
                                    <option value="Manual-JS">自定义 JavaScript&hellip;</option>
                                </select>
                            </h3>
                        </td>
                    </tr>
                    <tr>
                        <td height="30%">
                            <pre id="languagePre" class="prettyprint lang-js"></pre>
                            <textarea id="languageTA"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <td height="5%">
                            <h3>代码生成器：
                                <select id="language">
                                    <option value="JavaScript">JavaScript</option>
                                    <option value="Python">Python</option>
                                    <option value="PHP">PHP</option>
                                    <option value="Lua">Lua</option>
                                    <option value="Dart">Dart</option>
                                </select>
                            </h3>
                        </td>
                    </tr>
                    <tr>
                        <td height="30%">
                            <pre id="generatorPre" class="prettyprint lang-js"></pre>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>

    <div id="modalShadow"></div>

    <xml xmlns="https://developers.google.com/blockly/xml" id="blockfactory_toolbox" class="toolbox">
        <category name="输入" colour="#5b80a5">
            <block type="input_value">
                <value name="TYPE">
                    <shadow type="type_null"></shadow>
                </value>
            </block>
            <block type="input_statement">
                <value name="TYPE">
                    <shadow type="type_null"></shadow>
                </value>
            </block>
            <block type="input_dummy"></block>
        </category>
        <category name="领域" colour="#5ba58c">
            <block type="field_static"></block>
            <block type="field_label_serializable"></block>
            <block type="field_input"></block>
            <block type="field_number"></block>
            <block type="field_angle"></block>
            <block type="field_dropdown"></block>
            <block type="field_checkbox"></block>
            <block type="field_colour"></block>
            <block type="field_variable"></block>
            <block type="field_image"></block>
        </category>
        <category name="类型" colour="#5b67a5">
            <block type="type_group"></block>
            <block type="type_null"></block>
            <block type="type_boolean"></block>
            <block type="type_number"></block>
            <block type="type_string"></block>
            <block type="type_list"></block>
            <block type="type_other"></block>
        </category>
        <category name="颜色" id="colourCategory" colour="#a55b5b">
            <label text="十六进制颜色" ></label>
            <block type="colour_hue2"></block>
            <label text="HSV 色彩空间" ></label>
            <block type="colour_hue">
                <mutation colour="20"></mutation>
                <field name="HUE">20</field>
            </block>
            <block type="colour_hue">
                <mutation colour="65"></mutation>
                <field name="HUE">65</field>
            </block>
            <block type="colour_hue">
                <mutation colour="120"></mutation>
                <field name="HUE">120</field>
            </block>
            <block type="colour_hue">
                <mutation colour="160"></mutation>
                <field name="HUE">160</field>
            </block>
            <block type="colour_hue">
                <mutation colour="210"></mutation>
                <field name="HUE">210</field>
            </block>
            <block type="colour_hue">
                <mutation colour="230"></mutation>
                <field name="HUE">230</field>
            </block>
            <block type="colour_hue">
                <mutation colour="260"></mutation>
                <field name="HUE">260</field>
            </block>
            <block type="colour_hue">
                <mutation colour="290"></mutation>
                <field name="HUE">290</field>
            </block>
            <block type="colour_hue">
                <mutation colour="330"></mutation>
                <field name="HUE">330</field>
            </block>
        </category>
    </xml>

    <xml xmlns="https://developers.google.com/blockly/xml" id="workspacefactory_toolbox" class="toolbox">
        <category name="逻辑" colour="210">
            <block type="controls_if"></block>
            <block type="logic_compare"></block>
            <block type="logic_operation"></block>
            <block type="logic_negate"></block>
            <block type="logic_boolean"></block>
            <block type="logic_null"></block>
            <block type="logic_ternary"></block>
        </category>
        <category name="循环" colour="120">
            <block type="controls_repeat_ext">
                <value name="TIMES">
                    <shadow type="math_number">
                        <field name="NUM">10</field>
                    </shadow>
                </value>
            </block>
            <block type="controls_whileUntil"></block>
            <block type="controls_for">
                <value name="FROM">
                    <shadow type="math_number">
                        <field name="NUM">1</field>
                    </shadow>
                </value>
                <value name="TO">
                    <shadow type="math_number">
                        <field name="NUM">10</field>
                    </shadow>
                </value>
                <value name="BY">
                    <shadow type="math_number">
                        <field name="NUM">1</field>
                    </shadow>
                </value>
            </block>
            <block type="controls_forEach"></block>
            <block type="controls_flow_statements"></block>
        </category>
        <category name="数学" colour="230">
            <block type="math_number"></block>
            <block type="math_arithmetic">
                <value name="A">
                    <shadow type="math_number">
                        <field name="NUM">1</field>
                    </shadow>
                </value>
                <value name="B">
                    <shadow type="math_number">
                        <field name="NUM">1</field>
                    </shadow>
                </value>
            </block>
            <block type="math_single">
                <value name="NUM">
                    <shadow type="math_number">
                        <field name="NUM">9</field>
                    </shadow>
                </value>
            </block>
            <block type="math_trig">
                <value name="NUM">
                    <shadow type="math_number">
                        <field name="NUM">45</field>
                    </shadow>
                </value>
            </block>
            <block type="math_constant"></block>
            <block type="math_number_property">
                <value name="NUMBER_TO_CHECK">
                    <shadow type="math_number">
                        <field name="NUM">0</field>
                    </shadow>
                </value>
            </block>
            <block type="math_round">
                <value name="NUM">
                    <shadow type="math_number">
                        <field name="NUM">3.1</field>
                    </shadow>
                </value>
            </block>
            <block type="math_on_list"></block>
            <block type="math_modulo">
                <value name="DIVIDEND">
                    <shadow type="math_number">
                        <field name="NUM">64</field>
                    </shadow>
                </value>
                <value name="DIVISOR">
                    <shadow type="math_number">
                        <field name="NUM">10</field>
                    </shadow>
                </value>
            </block>
            <block type="math_constrain">
                <value name="VALUE">
                    <shadow type="math_number">
                        <field name="NUM">50</field>
                    </shadow>
                </value>
                <value name="LOW">
                    <shadow type="math_number">
                        <field name="NUM">1</field>
                    </shadow>
                </value>
                <value name="HIGH">
                    <shadow type="math_number">
                        <field name="NUM">100</field>
                    </shadow>
                </value>
            </block>
            <block type="math_random_int">
                <value name="FROM">
                    <shadow type="math_number">
                        <field name="NUM">1</field>
                    </shadow>
                </value>
                <value name="TO">
                    <shadow type="math_number">
                        <field name="NUM">100</field>
                    </shadow>
                </value>
            </block>
            <block type="math_random_float"></block>
        </category>
        <category name="文本" colour="160">
            <block type="text"></block>
            <block type="text_join"></block>
            <block type="text_append">
                <value name="TEXT">
                    <shadow type="text"></shadow>
                </value>
            </block>
            <block type="text_length">
                <value name="VALUE">
                    <shadow type="text">
                        <field name="TEXT">abc</field>
                    </shadow>
                </value>
            </block>
            <block type="text_isEmpty">
                <value name="VALUE">
                    <shadow type="text">
                        <field name="TEXT"></field>
                    </shadow>
                </value>
            </block>
            <block type="text_indexOf">
                <value name="VALUE">
                    <block type="variables_get">
                        <field name="VAR">text</field>
                    </block>
                </value>
                <value name="FIND">
                    <shadow type="text">
                        <field name="TEXT">abc</field>
                    </shadow>
                </value>
            </block>
            <block type="text_charAt">
                <value name="VALUE">
                    <block type="variables_get">
                        <field name="VAR">text</field>
                    </block>
                </value>
            </block>
            <block type="text_getSubstring">
                <value name="STRING">
                    <block type="variables_get">
                        <field name="VAR">text</field>
                    </block>
                </value>
            </block>
            <block type="text_changeCase">
                <value name="TEXT">
                    <shadow type="text">
                        <field name="TEXT">abc</field>
                    </shadow>
                </value>
            </block>
            <block type="text_trim">
                <value name="TEXT">
                    <shadow type="text">
                        <field name="TEXT">abc</field>
                    </shadow>
                </value>
            </block>
            <block type="text_print">
                <value name="TEXT">
                    <shadow type="text">
                        <field name="TEXT">abc</field>
                    </shadow>
                </value>
            </block>
            <block type="text_prompt_ext">
                <value name="TEXT">
                    <shadow type="text">
                        <field name="TEXT">abc</field>
                    </shadow>
                </value>
            </block>
        </category>
        <category name="列表" colour="260">
            <block type="lists_create_with">
                <mutation items="0"></mutation>
            </block>
            <block type="lists_create_with"></block>
            <block type="lists_repeat">
                <value name="NUM">
                    <shadow type="math_number">
                        <field name="NUM">5</field>
                    </shadow>
                </value>
            </block>
            <block type="lists_length"></block>
            <block type="lists_isEmpty"></block>
            <block type="lists_indexOf">
                <value name="VALUE">
                    <block type="variables_get">
                        <field name="VAR">list</field>
                    </block>
                </value>
            </block>
            <block type="lists_getIndex">
                <value name="VALUE">
                    <block type="variables_get">
                        <field name="VAR">list</field>
                    </block>
                </value>
            </block>
            <block type="lists_setIndex">
                <value name="LIST">
                    <block type="variables_get">
                        <field name="VAR">list</field>
                    </block>
                </value>
            </block>
            <block type="lists_getSublist">
                <value name="LIST">
                    <block type="variables_get">
                        <field name="VAR">list</field>
                    </block>
                </value>
            </block>
            <block type="lists_split">
                <value name="DELIM">
                    <shadow type="text">
                        <field name="TEXT">,</field>
                    </shadow>
                </value>
            </block>
            <block type="lists_sort"></block>
        </category>
        <category name="颜色" colour="20">
            <block type="colour_picker"></block>
            <block type="colour_random"></block>
            <block type="colour_rgb">
                <value name="RED">
                    <shadow type="math_number">
                        <field name="NUM">100</field>
                    </shadow>
                </value>
                <value name="GREEN">
                    <shadow type="math_number">
                        <field name="NUM">50</field>
                    </shadow>
                </value>
                <value name="BLUE">
                    <shadow type="math_number">
                        <field name="NUM">0</field>
                    </shadow>
                </value>
            </block>
            <block type="colour_blend">
                <value name="COLOUR1">
                    <shadow type="colour_picker">
                        <field name="COLOUR">#ff0000</field>
                    </shadow>
                </value>
                <value name="COLOUR2">
                    <shadow type="colour_picker">
                        <field name="COLOUR">#3333ff</field>
                    </shadow>
                </value>
                <value name="RATIO">
                    <shadow type="math_number">
                        <field name="NUM">0.5</field>
                    </shadow>
                </value>
            </block>
        </category>
        <sep></sep>
        <category name="变量" colour="330" custom="VARIABLE"></category>
        <category name="函数" colour="290" custom="PROCEDURE"></category>
        <sep></sep>
        <category name="我的积木" colour="260" id="blockLibCategory"></category>
    </xml>

</body>

</html>